<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>标签</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <link rel="stylesheet"href="../static/css/me.css" />
</head>
<body class="tag-bg">
    <!-- 导航 -->
    <nav th:replace="_fragments::menu(3)"  class="ui inverted attached segment m-shadow-small">

    </nav>

    <!-- 中间 -->
    <div class="m-container-small m-padded-tb-big">
        <div class="ui container">
            <div class="ui top attached segment">
                <div class="ui middle aligned two column grid">
                    <div class="column">
                        <h3 class="ui teal header">标签</h3>
                    </div>
                    <div class=" right aligned column">
                        共 <h3 class="ui orange header m-inline-block" th:text="${tags.size()}">14</h3> 个
                    </div>
                </div>
            </div>
        </div>
        <!-- 标签 -->
        <div class="ui attached segment m-padded-tb-large">
            <a href="#" th:href="@{/tag/{name}(name=${tag.name})}"  class="ui basic left pointing large label m-margin-tb-tiny" th:each="tag : ${tags}">
                <span th:text="${tag.name}">方法论</span> <div class="detail" th:text="${tag.blogCount}">23</div>
            </a>
        </div>
        <!-- 博客栏 -->
        <div class="ui top attached teal segment">
            <div class="ui padded vertical segment m-padded-tb-large m-padded-lr-responsive" th:each="blog : ${pages.list}">
                <div class="ui middle aligned mobile reversed stackable grid">

                    <div class="eleven wide column">
                        <h3 class="ui header"><a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="m-black" th:text="${blog.title}" >你真的理解IT行业吗？</a></h3>
                        <p class="m-text" th:text="|${blog.description}......|">我吐了呀我吐了呀我吐了呀我吐了呀我吐了呀我吐了呀</p>
                        <div class="ui stackable grid">
                            <div class="eleven wide column">
                                <div class="ui mini horizontal link list">
                                    <div class="item">
                                        <img  th:src="${blog.user.avatar}" alt="" class="ui avatar image" style="width: 30px;"/>
                                        <div class="content"><a href="#" class="header" th:text="${blog.user.username}"></a></div>
                                    </div>
                                    <div class="item">
                                        <i class="calendar icon"></i><span th:text="${#temporals.format(blog.updateTime, 'yyyy-MM-dd')}"></span>
                                    </div>
                                </div>
                            </div>
                            <div class="right aligned five wide column">
                                <a href="#" th:href="@{/type/{id}(id=${blog.typeId})}" target="_blank" class="ui teal basic label m-padded-mini m-text-thin" th:text="${blog.type.name}">认知升级</a>
                            </div>
                        </div>
                    </div>

                    <div class="five wide column">
                        <a href="#" target="_blank">
                            <img  th:src="${blog.photo}" alt="" class="ui rounded image" style="width: 750px;height: 130px">
                        </a>
                    </div>

                    <div class="ui bottom attached segment" th:if="${pagePath=='tagName'}">
                        <div class="ui middle aligned two column grid">
                            <div class="column">
                                <a  class="ui mini teal basic button" th:href="@{/tag/${tagName}/(pageNum=${pages.hasPreviousPage}?${pages.prePage}:1)}">上一页</a>
                            </div>
                            <div class=" right aligned column">
                                <a  class="ui mini teal basic button" th:href="@{/tag/${tagName}/(pageNum=${pages.hasNextPage}?${pages.nextPage}:${pages.pages})}">下一页</a>
                            </div>
                        </div>
                    </div>

                    <div class="ui bottom attached segment" th:if="${pagePath=='tag'}">
                        <div class="ui middle aligned two column grid">
                            <div class="column">
                                <a href="#" class="ui mini teal basic button" th:href="@{/tag/(pageNum=${pages.hasPreviousPage}?${pages.prePage}:1)}">上一页</a>
                            </div>
                            <div class=" right aligned column">
                                <a href="#" class="ui mini teal basic button" th:href="@{/tag/(pageNum=${pages.hasNextPage}?${pages.nextPage}:${pages.pages})}">下一页</a>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>

        <!-- 翻页 -->


    </div>

    <br>
    <br>
    <br>

    <!-- 底部 -->
    <footer th:replace="_fragments::footer" class="ui inverted vertical segment m-padded-tb-massive">

    </footer>

    <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
    <script>
        $('.menu.toggle').click(function () {
            $('.m-item').toggleClass('m-mobile-hide');
        });
    </script>
</body>
</html>